<!--$embed{"header.htm"}-->

<!--$if{ space['self']}-->
<div class="searchbar">
<form method="get" action="network.html">
	<input name="key" value="" size="26" class="t_input" type="text">
	<input name="searchsubmit" value="搜索相册" class="submit" type="submit">
	<input type="hidden" name="searchmode" value="1" />
	<!--$if{ view=='me'}-->
	<input type="hidden" name="username" value="${space['username']}" />
	<!--$end-->
	<input type="hidden" name="ac" value="album" />
</form>
</div>
<h2 class="title"><img src="image/app/album.gif">相册 - ${album['albumname']}</h2>
<div class="tabs_header">
	<ul class="tabs">
		<li class="active"><a href="space.html?uid=${pic['uid']}&do=album&id=${pic['albumid']}"><span>查看图片</span></a></li>
		<li><a href="space.html?uid=${space['uid']}&do=album&id=${pic['albumid']}"><span>返回列表</span></a></li>
		<li><a href="space.html?uid=${space['uid']}&do=album&view=me"><span>返回我的相册</span></a></li>
		<li class="null"><a href="cp.html?ac=upload&albumid=${pic['albumid']}">上传新图片</a></li>
	</ul>
</div>
<!--$else-->
<!--$embed{"space_menu.htm"}-->
<!--$end-->

<div class="h_status">
	<div class="r_option">
		
		<a href="space.html?uid=${pic['uid']}&do=album&picid=${pic['picid']}&goto=up">上一张</a><span class="pipe">|</span>
		<a href="space.html?uid=${pic['uid']}&do=album&picid=${pic['picid']}&goto=down" id="nextlink">下一张</a><span class="pipe">|</span>
		<!--$if{ play}-->
		<a href="javascript:;" id="playid" onclick="playNextPic(false);">停止播放</a>
		<!--$else-->
		<a href="javascript:;" id="playid" onclick="playNextPic(true);">幻灯播放</a>
		<!--$end--><span id="displayNum"></span><span class="pipe">|</span>
		<!--$if{canManageAlbum}--><a href="cp.html?ac=common&op=manage&idtype=picid&id=${pic['picid']}" id="a_manage" onclick="ajaxmenu(event, this.id, 99999)">管理</a><span class="pipe">|</span><!--$end-->
		<a href="cp.html?ac=common&op=report&idtype=picid&id=${pic['picid']}" id="a_report" onclick="ajaxmenu(event, this.id, 99999,'' , -1)">举报</a>
	</div>
	<!--$if{ album['picnum']}-->当前第 ${sequence} 张<span class="pipe">|</span>共 ${album['picnum']} 张图片<!--$end-->&nbsp;
	<!--$if{ album['friend']}-->
	<span class="locked gray">
	<!--$if{ album['friend'] == 1}-->仅好友可见<!--$end-->
	<!--$if{ album['friend'] == 2}-->指定好友可见<!--$end-->
	<!--$if{ album['friend'] == 3}-->仅自己可见<!--$end-->
	<!--$if{ album['friend'] == 4}-->凭密码可见<!--$end-->
	</span>
	<!--$end-->
</div>


<div class="photobox">
	<a href="space.html?uid=${pic['uid']}&do=album&picid=${pic['picid']}&goto=down"><img src="${pic['pic']}" /></a>
	<p>${pic['title']}</p>
	<a href="cp.html?ac=share&type=pic&id=${pic['picid']}" id="a_share_${pic['picid']}" class="a_share" onclick="ajaxmenu(event, this.id, 99999,'' , -1)" class="a_share">分享</a>
	<p>上传于 <!--${&com.heaven.web.utils.Common.date(pic['dateline'], 'yyyy-MM-dd HH:mm')}--> (${pic['formatSize']})</p>
	<!--$if{exifs}-->
	<!--$for{entry:exifs} $set{value = entry.value} $set{key = entry.key}-->
	<!--$if{ value}--><p>${key} : ${value}</p><!--$end-->
	<!--$end-->
	<!--$else-->
		<p>无EXIF信息</p>
	<!--$end-->
	<!--$if{ pic['uid']==_SGLOBAL['supe_uid']}--><p><a href="javascript:;" onclick="update_title();">更新图片说明</a></p><!--$end-->
	<div id="title_form" style="display:none;text-align:left;">
		<form id="titleform" name="titleform" action="cp.html?ac=album&op=editpic&subop=update&albumid=${pic['albumid']}" method="post">
			<textarea name="title${pic['picid']}" cols="70" rows="3" style="width: 380px">${pic['title']}</textarea>
			<br><input type="submit" name="editpicsubmit" class="submit" value="更新">
			<input type="hidden" name="refer" value="space.html?uid=${pic['uid']}&do=album&picid=${pic['picid']}">
			<input type="hidden" name="formhash" value="<!--${&com.heaven.web.utils.Common.formhash()}-->" />
			<input type="hidden" name="picid" value="${pic['picid']}"/>
		</form>
	</div>
</div>

		
<div style="padding-top:20px; width:100%; overflow:hidden;">
	<div class="photocomment">	
		<div class="comments_list" id="comment">
			<!--$if{cid}-->
			<div class="notice">
				当前只显示与你操作相关的单个评论，<a href="space.html?uid=${pic['uid']}&do=album&picid=${pic['picid']}#comment">点击此处查看全部评论</a>
			</div>
			<!--$end-->
		
			<ul id="comment_ul">
			<!--$for{value:list}-->
				<!--$embed{"space_comment_li.htm"}-->
			<!--$end-->
			</ul>
		</div>
		<div class="page">${multi}</div>
		<form id="quickcommentform_${picid}" name="quickcommentform_${picid}" action="cp.html?ac=comment" method="post" class="quickpost" style="padding-bottom: 1em;">
			<table cellpadding="0" cellspacing="0">
				<tr>
					<td>
						<a href="###" id="comment_face" onclick="showFace(this.id, 'comment_message');"><img src="image/facelist.gif" align="absmiddle" /></a><br>
						<textarea id="comment_message" onkeydown="ctrlEnter(event, 'commentsubmit_btn');" name="message" rows="5" cols="60" style="width: 380px;"></textarea>
					</td>
				</tr>
				<tr>
					<td>
					<input type="hidden" name="refer" value="space.html?uid=${pic['uid']}&do=${do}&picid=${pic['picid']}" />
					<input type="hidden" name="id" value="${picid}">
					<input type="hidden" name="idtype" value="picid">
					<input type="hidden" name="commentsubmit" value="true">
					<input type="button" id="commentsubmit_btn" name="commentsubmit_btn" class="submit" value="评论" onclick="ajaxpost('quickcommentform_${picid}', 'comment_status', 'comment_add')" />
					<span id="comment_status"></span>
					</td>
				</tr>
			</table>
		<input type="hidden" name="formhash" value="<!--${&com.heaven.web.utils.Common.formhash()}-->" />
		</form>
	</div>
	
	<div class="photobar">
		<div class="cat">
			<ul>
				<li><a href="${pic['pic']}" target="_blank">新窗口查看原图</a></li>
				<li><a href="javascript:;" onclick="javascript:setCopy('${pic_url}');return false;">复制图片地址</a></li>
			<!--$if{ !exifs}-->
				<li><a href="space.html?uid=${pic['uid']}&do=${do}&picid=${pic['picid']}&exif">显示图片EXIF信息</a></li>
			<!--$end-->
			<!--$if{ pic['uid']==_SGLOBAL['supe_uid']}-->
				<li><a href="cp.html?ac=album&op=editpic&albumid=${pic['albumid']}&picid=${pic['picid']}">编辑图片</a></li>
			<!--$end-->		
			</ul>
		</div>
	</div>
</div>


<script type="text/javascript">
<!--
	var interval = 5000;
	var timerId = -1;
	var derId = -1;
	var replay = false;
	var num = 0;
	var endPlay = false;
	function forward() {
		window.location.href = 'space.html?uid=${pic['uid']}&do=album&picid=${pic['picid']}&goto=down&play=1';
	}
	function derivativeNum() {
		num++;
		document.getElementById('displayNum').innerHTML = '[' + (interval/1000 - num) + ']';
	}
	function playNextPic(stat) {
		if(stat || replay) {
			derId = window.setInterval('derivativeNum();', 1000);
			document.getElementById('displayNum').innerHTML = '[' + (interval/1000 - num) + ']';
			document.getElementById('playid').innerHTML = '停止播放';
			timerId = window.setInterval('forward();', interval);
		} else {
			replay = true;
			num = 0;
			if(endPlay) {
				document.getElementById('playid').innerHTML = '重新播放';
			} else {
				document.getElementById('playid').innerHTML = '幻灯播放';
			}
			document.getElementById('displayNum').innerHTML = '';
			window.clearInterval(timerId);
			window.clearInterval(derId);
		}
	}
	<!--$if{ play}-->
	<!--$if{ sequence > 0 && album['picnum']}-->
	if(${sequence} == ${album['picnum']}) {
		endPlay = true;
		playNextPic(false);
	} else {
		playNextPic(true);
	}
	<!--$else-->
	playNextPic(true);
	<!--$end-->
	<!--$end-->
	
	function update_title() {
		document.getElementById('title_form').style.display='';
	}
//-->
</script>

	
<!--$embed{"footer.htm"}-->